#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <math.h>
int main()
{
	int m, n;
	double sum = 0;
	scanf("%d %d", &m, &n);

	for (int i = m; i <= n; i++)
		sum = sum + pow(i, 2) + 1.0 / i;

	printf("%lf", sum);
	return 0;
}